package org.jawa.exam.model;

import java.util.Date;

import org.jawa.core.cache.CacheSizes;
import org.jawa.core.cache.Cacheable;
import org.jawa.core.cache.CannotCalculateSizeException;

/**
 * 
 * 类文件: Paper
 * <p>
 * <p>
 * 类描述：试卷信息表
 * <p>
 * 作     者： migrant423
 * <p>
 * 日     期： 2012-7-16
 * <p>
 * 时     间： 下午8:45:51
 * <p>
 */
public class Paper implements Cacheable {

	private static final long serialVersionUID = -255230678409259791L;
	/**
	 * 试卷编号
	 */
	private Long paperId;
	/**
	 * 试卷名称
	 */
	private String paperName;
	/**
	 * 试卷发布人
	 */
	private Long postUser;
	/**
	 * 发布日期
	 */
	private Date postTime;
	/**
	 * 失效时间
	 */
	private Date invalidTime;
	/**
	 * 业务类型
	 */
	private String paperKind;
	/**
	 * 试卷类型
	 */
	private String papaerType;
	/**
	 * 试卷状态
	 */
	private String paperStatus;
	/**
	 * 试卷总分值
	 */
	private double totalScore;
	/**
	 * 试卷描述
	 */
	private String paperDesc;
	/**
	 * 备注
	 */
	private String remark;

	public Long getPaperId() {
		return paperId;
	}

	public void setPaperId(Long paperId) {
		this.paperId = paperId;
	}

	public String getPaperName() {
		return paperName;
	}

	public void setPaperName(String paperName) {
		this.paperName = paperName;
	}

	public Long getPostUser() {
		return postUser;
	}

	public void setPostUser(Long postUser) {
		this.postUser = postUser;
	}

	public Date getPostTime() {
		return postTime;
	}

	public void setPostTime(Date postTime) {
		this.postTime = postTime;
	}

	public Date getInvalidTime() {
		return invalidTime;
	}

	public void setInvalidTime(Date invalidTime) {
		this.invalidTime = invalidTime;
	}

	public String getPaperKind() {
		return paperKind;
	}

	public void setPaperKind(String paperKind) {
		this.paperKind = paperKind;
	}

	public String getPapaerType() {
		return papaerType;
	}

	public void setPapaerType(String papaerType) {
		this.papaerType = papaerType;
	}

	public String getPaperStatus() {
		return paperStatus;
	}

	public void setPaperStatus(String paperStatus) {
		this.paperStatus = paperStatus;
	}

	public double getTotalScore() {
		return totalScore;
	}

	public void setTotalScore(double totalScore) {
		this.totalScore = totalScore;
	}

	public String getPaperDesc() {
		return paperDesc;
	}

	public void setPaperDesc(String paperDesc) {
		this.paperDesc = paperDesc;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public int getCachedSize() throws CannotCalculateSizeException {
		int size = 0;
		size += CacheSizes.sizeOfObject();
		size += CacheSizes.sizeOfLong();
		size+=CacheSizes.sizeOfString(paperName);
		size += CacheSizes.sizeOfLong();
		size+=CacheSizes.sizeOfDate();
		size+=CacheSizes.sizeOfDate();
		size+=CacheSizes.sizeOfString(paperKind);
		size+=CacheSizes.sizeOfString(papaerType);
		size+=CacheSizes.sizeOfString(paperStatus);
		size+=CacheSizes.sizeOfDouble();
		size+=CacheSizes.sizeOfString(paperDesc);
		size+=CacheSizes.sizeOfString(remark);
		return size;
	}

}
